package com.xhtt.modules.cfg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 数据字典表-地区表
 * </p>
 *
 * @author xj
 * @since 2019-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CfgArea extends Model<CfgArea> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer code;

    /**
     * 地区名称
     */
    private String name;

    /**
     * 上级ID
     */
    private Integer parentId;

    private String memo;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
